package io.renren.modules.knowledge.service.Impl;

import io.renren.modules.knowledge.dao.KnowledgeDao;
import io.renren.modules.knowledge.entity.KnowledgeEntity;
import io.renren.modules.knowledge.respository.KnowledgeRespository;
import io.renren.modules.knowledge.service.KnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("KnowledgeService")
public class KnowledgeServiceImpl implements KnowledgeService {
    @Autowired
    private KnowledgeDao knowledgeDao;

    @Autowired
    private KnowledgeRespository knowledgeRespository;

    @Override
    public List<KnowledgeEntity> getDirection(Map<String, Object> params) {
        List<KnowledgeEntity> direction = knowledgeDao.getDirection(params);
        return direction;
    }

    @Override
    public void saveCoursesRelactionShip(Long startId, Long endId) {
        knowledgeRespository.saveCoursesRelactionShip(startId,endId);
    }

    @Override
    public void delCourseAndShip(Long deleteId) {
        knowledgeRespository.delCourseAndShip(deleteId);
    }

    @Override
    public void delCourseAndShipNoNodes(Long deleteId) {
        knowledgeRespository.delCourseAndShipNoNodes(deleteId);
    }


}
